<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>将 XML 译码为 PHP 本身的类型</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="function.xmlrpc-decode-request.html">« xmlrpc_decode_request</a></li>
      <li style="float: right;"><a href="function.xmlrpc-encode-request.html">xmlrpc_encode_request »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="ref.xmlrpc.html">XML-RPC 函数</a></li>
    <li>将 XML 译码为 PHP 本身的类型</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="function.xmlrpc-decode" class="refentry">
   <div class="refnamediv">
    <h1 class="refname">xmlrpc_decode</h1>
    <p class="verinfo">(PHP 4 &gt;= 4.1.0, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">xmlrpc_decode</span> &mdash; <span class="dc-title">将 XML 译码为 PHP 本身的类型</span></p>

   </div>
 <div class="refsect1 description" id="refsect1-function.xmlrpc-decode-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="methodname"><strong>xmlrpc_decode</strong></span>(<span class="methodparam"><span class="type">string</span> <code class="parameter">$xml</code></span>, <span class="methodparam"><span class="type">string</span> <code class="parameter">$encoding</code><span class="initializer"> = &quot;iso-8859-1&quot;</span></span>): <span class="type"><a href="language.types.declarations.html#language.types.declarations.mixed" class="type mixed">mixed</a></span></div>

  <div class="warning"><strong class="warning">警告</strong><p class="simpara">此函数是<em class="emphasis">实验性</em>的。此函数的表象，包括名称及其相关文档都可能在未来的
PHP 发布版本中未通知就被修改。使用本函数风险自担。</p></div>
 </div>

<div class="refsect1 parameters" id="refsect1-function.xmlrpc-decode-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">xml</code></dt>

     <dd>

      <p class="para">
       XML response returned by XMLRPC method.
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">encoding</code></dt>

     <dd>

      <p class="para">
       Input encoding supported by iconv.
      </p>
     </dd>

    
   </dl>

  </p>
 </div>

 
 <div class="refsect1 returnvalues" id="refsect1-function.xmlrpc-decode-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   Returns either an array, or an integer, or a string, or a boolean according
   to the response returned by the XMLRPC method.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.xmlrpc-decode-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   See example by <span class="function"><a href="function.xmlrpc-encode-request.html" class="function">xmlrpc_encode_request()</a></span>.
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.xmlrpc-decode-seealso">
  <h3 class="title">参见</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"><span class="function"><a href="function.xmlrpc-encode-request.html" class="function" rel="rdfs-seeAlso">xmlrpc_encode_request()</a> - 为 PHP 的值生成 XML</span></li>
    <li class="member"><span class="function"><a href="function.xmlrpc-is-fault.html" class="function" rel="rdfs-seeAlso">xmlrpc_is_fault()</a> - Determines if an array value represents an XMLRPC fault</span></li>
   </ul>
  </p>
 </div>

  </div></div></div></body></html>